package cn.lhf.myblog.http.requst.user;

import cn.lhf.myblog.db.entity.User;
import cn.lhf.myblog.http.requst.Form;
import cn.lhf.myblog.service.UserService;

import static cn.lhf.myblog.utils.StringUtils.isNotEmpty;

public class LoginForm implements Form<UserService, User> {
    String loginName;
    String password;

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public boolean isForm() {
        return isNotEmpty(loginName) && isNotEmpty(password);
    }
}
